package com.example.bigdemo.service.impl;

import com.example.bigdemo.pojo.SNMPobject;
import com.example.bigdemo.sercive.GetMessageService;
import com.example.bigdemo.sercive.Impl.TrapserviceImpl;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.snmp4j.*;
import org.snmp4j.event.ResponseEvent;
import org.snmp4j.mp.MessageProcessingModel;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.*;
import org.snmp4j.transport.DefaultUdpTransportMapping;
import org.snmp4j.util.PDUFactory;
import org.snmp4j.util.TableEvent;
import org.snmp4j.util.TableUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.IOException;
import java.util.List;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class test {
    @Autowired
    TrapserviceImpl getMessageService;

    @Test
    public void bulk(){
//        String intflow = getMessageService.GetIntNetflow("localhost");
//        String outflow = getMessageService.GetOutNetflow("localhost");
//        if (intflow=="null" || outflow=="null"){
//
//        }else{
//            int intflownum = Integer.valueOf(intflow).intValue();
//            int outflownum = Integer.valueOf(outflow).intValue();
//
//        }
        try {
            getMessageService.Getflow("localhost");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }


    }




}
